import { applyMiddleware, createStore } from "@reduxjs/toolkit"
import { devToolsEnhancer, composeWithDevTools } from "@redux-devtools/extension"
import logger from "redux-logger"
import { todoApp } from "./reducers/app"
// configureStore.js
export const store = createStore(
  todoApp,
  {
    todos: [
      { id: 1, text: '看电影', completed: false },
      { id: 2, text: '遛狗', completed: true },
      { id: 3, text: '跑步', completed: false },
    ],
  },
  composeWithDevTools(applyMiddleware(logger))
)

window.store = store